//
//  BHFunCreateBottomView.swift
//  BigHealth
//
//  Created by 蔺百好 on 2021/6/24.
//

import UIKit

class BHFunCreateBottomView: UIView {
    
    lazy var shadowImgView: UIImageView = {
        let view = UIImageView.init()
        view.image = UIImage.init(named: "bh_competitionDetail_bottom_line")
        view.contentMode = .scaleToFill
        return view
    }()
    
    lazy var createBtn: UIButton = {
        let btn = UIButton.init(type: .custom)
        btn.backgroundColor = .color_34CE98
        btn.setTitle("立即创建", for: .normal)
        btn.showsTouchWhenHighlighted = false
        btn.setTitleColor(.white, for: .normal)
        btn.titleLabel?.font = .systemFont(ofSize: 16, weight: .bold)
        btn.addLayerCorner(25, 0, .white)
        return btn
    }()
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
    }
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        self.addSubview(self.shadowImgView)
        self.addSubview(self.createBtn)
        
        self.shadowImgView.mas_makeConstraints { (make) in
            make?.left.right()?.top()?.equalTo()(self)
            make?.height.mas_equalTo()(7)
        }
        
        self.createBtn.mas_makeConstraints { (make) in
            make?.left.equalTo()(self)?.offset()(16)
            make?.right.equalTo()(self)?.offset()(-16)
            make?.top.equalTo()(self)?.offset()(17)
            make?.height.mas_equalTo()(50)
        }
        
    }


    static var height: CGFloat {
        get {
            return 84+UIScreen.safeBottomHeight
        }
    }
}
